<%@ page pageEncoding="UTF-8"%>
<%@ include file="/common/validate.jsp"%>
<%@ include file="../function.jsp"%>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>查看新闻</title>
    <link  href="../../images/favicon.ico?cache=<%=Math.random()%>" rel="shortcut icon" type="image/x-icon">
    <link rel="stylesheet" href="../../css/public.css?cache=<%=Math.random()%>">
    <link rel="stylesheet" href="../../css/messages_doctor_mes_add.css?cache=<%=Math.random()%>">

    <link rel="stylesheet" href="../../css/sweetalert.css?cache=<%=Math.random()%>" >
    <script src="../../js/jquery-1.9.1.min.js"></script>
</head>
<body>
    <%@ include file="../../header.jsp"%>
    <!--内容-->
    <div class="containerone">
    <%@ include file="../../left_menu.jsp"%>
    <!--右边内容-->
    <div class="right_cont">
<!--右边内容-->
    <div class="message_right_cont_box" id="see_news">

          <div class="message_right_cont_container">
    <div class="add_doctor_tittle"><span v-html="deptName"></span>/<span v-html="option"></span></div>
          <div class="add_doctor">
              <span>新闻详情</span>
              <button class="back_doctor_mes" @click="back()">返回</button>
                </div>
              <div class="mes_see_con_below">
                <span><h1>标题：</h1><span class="mes_news_tittle" v-html="title"></span>
                <div class="clearfix"></div>
              </span>
              <span><h1>作者：</h1><span class="mes_news_tittle" v-html="author"></span>
              <div class="clearfix"></div></span>
                <span><h2>简介：</h2><span class="mes_news_less_intro" v-html="summary"></span></span>
               <span><p>内容：</p><span v-html="decode(content)"></span></span>
            </div>
          <div class="mes_see_edit">
              <button class="back_doctor_mes" @click="edit_news()"><a>编辑新闻</a></button>
                </div>
         </div>
    </div>
    </div>

<script src="../../js/sweetalert-dev.js"></script>
<script type="text/javascript">
    new Vue({
    el:"#see_news",
    data:{
    deptName:"",
    deptCode:"",
    option:"",
    news_id:"",
    labelId:"",
    title:"",
    author:"",
    summary:"",
    content:"",
    },
    ready:function(){
    var self = this;
    var news = getHrefParms("see_news");
    self.news_id = news.news_id;
    self.option = news.option;
    self.deptName = news.deptName;
    self.deptCode = news.deptCode;
    <%--第一次拿数据--%>
    $.ajax({
    type: 'post',
    url: "see_news.jsp",
    data: {
    act:"news",
    news_id:self.news_id,
    },
    timeout: 3000,
    dataType: 'json',
    success: function(res) {
    console.log(res);
    if (res.errcode == 0) {
    self.title=res.data.title;
    self.author=res.data.author;
    self.summary=res.data.summary;
    self.content=res.data.content;
    }
    },
    error: function(error) {
    }
    });
    },
    methods:{
    back:function(){
    locationHerf("news")
    },
    decode: function(i) {
    return decodeURI(i);
    },
    edit_news:function(){
    var self=this;
    var option=self.option;
    var news_id=self.news_id;
    locationHerf("edit_news",{
    news_id:news_id,
    option:option,
    })
    }
    }
    })
</script>
</body>
</html>
